﻿@model ContactManagement.Models.CategoriesAddModel
@{
    ViewBag.Title = Html.Categories().GetCategoriesPageTitle();
}

<div class="span12">
    <h2>@Html.Categories().GetCategoriesPageTitle()</h2>
    <hr />
    <div class="well">@Html.Categories().GetCategoriesElementTitle()</div>
</div>
<div class="span12">
    @using (Html.BeginForm(EActionAdministration.CategoriesEdit.ToString(), EControllers.Administration.ToString(), FormMethod.Post, new { @class = "form-horizontal" }))
    {
        <fieldset>
            @Html.MyValidationSummary()

            <div class="control-group">
                @Html.LabelFor(model => model.Name, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.Name)
                    @Html.ValidationMessageFor(model => model.Name)
                </div>
            </div>
            <div class="control-group">
                @Html.LabelFor(model => model.SortId, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.SortId)
                    @Html.ValidationMessageFor(model => model.SortId)
                </div>
            </div>
            <div class="form-actions">
                <input class="btn btn-primary" type="submit" value="@GlobalResources.Navigation.SaveChangesRESX" />
            </div>
        </fieldset>
    }
</div>

<div class="span12">
    <div class="well">
        @Html.RouteLink(GlobalResources.Navigation.BackToListRESX, RouteNames.Categories.ToString(),
                            new { controller = EControllers.Administration.ToString(), category = ViewContext.RouteData.GetRequiredString(WebConstants.CategoryString), action = EActionAdministration.CategoriesList.ToString() }, new { @class = "btn btn-small", data_icon = "icon-arrow-left" })
    </div>
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
